# Sets the minimum version of CMake required to build the native
# library. You should either keep the default value or only pass a
# value of 3.4.0 or lower.

cmake_minimum_required(VERSION 3.4.1)
#引用已近有的库
find_library( # Sets the name of the path variable.
              log-lib

               # Specifies the name of the NDK library that
              # you want CMake to locate.
              log )
#资源文件夹的位置libs
set(distribution_DIR ${CMAKE_SOURCE_DIR}/../../../../libs)
#导入类库,只是作为引用,不编译
add_library( x264
             SHARED
             IMPORTED )

#引用目标类库是本地类库位置在libs/x264/libx264.so
set_target_properties( x264
                       PROPERTIES IMPORTED_LOCATION
                       ../../../../libs/x264/libx264.so )

#添加类库位置在src/main/cpp/native-lib.c需要编译
add_library(native-lib
             SHARED
             src/main/cpp/native-lib.c)

#引入头文件目录位置
include_directories(libs/librtmp/include libs/x264/include libs/faac/include src/main/cpp)

#将预构建库与你本地库相关联
target_link_libraries( # Specifies the target library.
                       native-lib
                       jnigraphics
                       # Links the target library to the log library
                       # included in the NDK.
                       ${log-lib} )




